#Makefile for base

CC=gcc
APP=freeGL_object

INCLUDE=-I./include -I./libinsort/include -I./liblogo/include -I./libdata_struct/include
LIB=-L./libs

SOURCE=base.c
OBJS=base.o
LIBS=  -linsort -lfreegllogo -ldata_struct
CFLAGS= -O2 -Wall $(INCLUDE)


all:$(APP)
	
$(APP):$(OBJS)
	make -C ./libinsort/
	make -C ./liblogo/
	make -C ./libdata_struct/
	$(CC) -o $(APP) $(OBJS) $(CFLAGS) $(LIB) $(LIBS) -Wl,-rpath,./libs

$(OBJS):

.c.o:
	$(CC) -c $(CFLAGS) $< -o $@ 
clean:
	rm -f *.so *.o $(APP)
	make clean -C ./libinsort/
	make clean -C ./liblogo/
	make clean -C ./libdata_struct/

	
